<?php
session_start();
require '../nette/Nette/loader.php';
require '../db.php';
require '../localization/lang.php';
require '../core/core.sanitizer.php';
require '../core/core.security.php';
require '../core/core.time.php';
require '../visual/visual.tasks.php';

$login=new core_security;
if ($login->checklogin()=="OK") {

$query="select start_time from users WHERE id=".$_SESSION['uid']."";
$result=mysql_query($query);
$row=mysql_fetch_array($result);

if ($row['start_time'] == 'auto') {$checked='checked'; $disabled='disabled';} else {$checked=''; $disabled='';}

echo "default starting time: <input type='text' id ='settings_starttime' name='settings_starttime' value='".$row['start_time']."' ".$disabled."> <br>";
echo "current time <input type='checkbox' id='setautostart' onclick='setautostart(\"".$checked."\")' name='setautostart' ".$checked.">";

}
?>
